
package com.htd.htdapmcommon.enums;


public enum AlarmsChannelStatus {


	ONE_ALERT("onealert","OneAlert"),
    OTHER("other","其他");


	private String code;

	private String msg;

	private AlarmsChannelStatus(String code, String msg){
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
    /**
     * 根据code获取去value
     * @param code
     * @return
     */
    public static String getValueByCode(String code){
         for(AlarmsChannelStatus alarmsChannelStatus:AlarmsChannelStatus.values()){
             if(code.equals(alarmsChannelStatus.getCode())) {
                 return alarmsChannelStatus.getMsg();
             }
         } return null;
     }


}
